package com.guyaning.deyson_core.core.ui.banner;

import com.ToxicBakery.viewpager.transforms.DefaultTransformer;
import com.bigkoo.convenientbanner.ConvenientBanner;
import com.bigkoo.convenientbanner.listener.OnItemClickListener;
import com.guyaning.deyson_core.core.R;

import java.util.ArrayList;

/**
 * Created by Administrator on 2018/6/12.
 */

public class BannerCreator {

    public static void setDefult(ConvenientBanner<String> convenientBanner, ArrayList<String> banners, OnItemClickListener onItemClickListener){

         convenientBanner.setPages(new HolderCreator(),banners)
                         .setPageIndicator(new int[]{R.drawable.hot_normal,R.drawable.hot_focus})
                         .setPageIndicatorAlign(ConvenientBanner.PageIndicatorAlign.CENTER_HORIZONTAL)
                         .setOnItemClickListener(onItemClickListener)
                         .setPageTransformer(new DefaultTransformer())
                         .startTurning(3000)
                         .setCanLoop(true);

    }

}
